package com.dgut.sales.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dgut.sales.bean.Purchase;
import com.dgut.sales.dao.PurchaseDao;

@Service
public class PurchaseService {

	@Autowired
	private PurchaseDao dao;
	
	public Purchase getPurchaseById(Integer id) {
		return dao.getPurchaseById(id);
	}
	
	public List<Purchase> getAllPurchase(){
		return dao.getAllPurchase();
	}
	
	public void addPurchase(Purchase purchase) {
		dao.addPurchase(purchase);
	}
	
	public void updateStates(Integer id) {
		dao.updateStates(id);
	} 
}
